/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pruebas;

import beans.Palabra;
import java.util.Scanner;

/**
 *
 * @author JAVA-FUN
 */
public class Prueba {

    public static void main(String[] args) {

        Palabra palabra1 = new Palabra("P1");
        Palabra palabra2 = new Palabra("P2");
        Palabra palabra3 = new Palabra("P3");

        Scanner scanner = new Scanner(System.in);
        String s = null;

        do {
            do {
                System.out.println("");
                System.out.print("Elija el parrafo [P1, P2, P3]: ");
                s = scanner.nextLine();
            } while (!s.equalsIgnoreCase("P1") && !s.equalsIgnoreCase("P2") && !s.equalsIgnoreCase("P3"));


            if (s.equalsIgnoreCase("P1")) {
                palabra1.pedido();
            }

            if (s.equalsIgnoreCase("P2")) {
                palabra2.pedido();
            }

            if (s.equalsIgnoreCase("P3")) {
                palabra3.pedido();
            }

            do {
                System.out.print("Continuar [si/no]: ");
                s = scanner.nextLine();
            } while (!s.equalsIgnoreCase("si") && !s.equalsIgnoreCase("no"));

            if (s.equalsIgnoreCase("si")) {
                continue;
            }
            if (s.equalsIgnoreCase("no")) {
                break;
            }

        } while (true);

        palabra1.reporte();
        palabra2.reporte();
        palabra3.reporte();
    }
}
